/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; import * as Skyflow from "../../../index"; export declare namespace Files { interface Options { environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; token: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Additional headers to include in the request. */ headers?: Record; } } export declare class Files { protected readonly _options: Files.Options; constructor(_options: Files.Options); /** * De-identifies sensitive data from a file. This operation includes options applicable to all supported file types.

For more specific options, see the category-specific operations (like De-identify Document) and the file type-specific opertions (like De-identify PDF). * * @param {Skyflow.DeidentifyFileRequest} request * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Skyflow.BadRequestError} * @throws {@link Skyflow.UnauthorizedError} * @throws {@link Skyflow.InternalServerError} * * @example * await client.files.deidentifyFile({ * vault_id: "f4b3b3b33b3b3b3b3b3b3b3b3b3b3b3b", * file: { * base64: "Zm9vYmFy", * data_format: "txt" * } * }) * * @example * await client.files.deidentifyFile({ * vault_id: "VAULT_ID", * file: { * base64: "Zm9vYmFy", * data_format: "txt" * } * }) */ deidentifyFile(request: Skyflow.DeidentifyFileRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __deidentifyFile; /** * De-identifies sensitive data from a document file. This operation includes options applicable to all supported document file types.

For more specific options, see the file type-specific opertions (like De-identify PDF) where they're available. For broader file type support, see De-identify File. * * @param {Skyflow.DeidentifyDocumentRequest} request * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Skyflow.BadRequestError} * @throws {@link Skyflow.UnauthorizedError} * @throws {@link Skyflow.InternalServerError} * * @example * await client.files.deidentifyDocument({ * vault_id: "f4b3b3b33b3b3b3b3b3b3b3b3b3b3b3b", * file: { * base64: "SGkgaSBhbSBEZXZhbnNodSwgbGl2...aW5nIGluIGNhbGlmb3JuaWEuIA==", * data_format: "docx" * } * }) * * @example * await client.files.deidentifyDocument({ * vault_id: "VAULT_ID", * file: { * base64: "BASE64_DATA", * data_format: "docx" * } * }) */ deidentifyDocument(request: Skyflow.DeidentifyDocumentRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __deidentifyDocument; /** * De-identifies sensitive data from a PDF file. This operation includes options specific to PDF files.

For broader file type support, see De-identify Document and De-identify File. * * @param {Skyflow.DeidentifyPdfRequest} request * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Skyflow.BadRequestError} * @throws {@link Skyflow.UnauthorizedError} * @throws {@link Skyflow.InternalServerError} * * @example * await client.files.deidentifyPdf({ * vault_id: "f4b3b3b33b3b3b3b3b3b3b3b3b3b3b3b", * file: { * base64: "SGkgaSBhbSBEZXZhbnNodSwgbGl2...aW5nIGluIGNhbGlmb3JuaWEuIA==", * data_format: "pdf" * } * }) * * @example * await client.files.deidentifyPdf({ * vault_id: "VAULT_ID", * file: { * base64: "BASE64_DATA", * data_format: "pdf" * } * }) */ deidentifyPdf(request: Skyflow.DeidentifyPdfRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __deidentifyPdf; /** * De-identifies sensitive data from an image file. This operation includes options applicable to all supported image file types.

For broader file type support, see De-identify File. * * @param {Skyflow.DeidentifyImageRequest} request * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Skyflow.BadRequestError} * @throws {@link Skyflow.UnauthorizedError} * @throws {@link Skyflow.InternalServerError} * * @example * await client.files.deidentifyImage({ * vault_id: "f4b3b3b33b3b3b3b3b3b3b3b3b3b3b3b", * file: { * base64: "SGkgaSBhbSBEZXZhbnNodSwgbGl2...aW5nIGluIGNhbGlmb3JuaWEuIA==", * data_format: "jpg" * } * }) * * @example * await client.files.deidentifyImage({ * vault_id: "VAULT_ID", * file: { * base64: "BASE64_DATA", * data_format: "jpg" * } * }) */ deidentifyImage(request: Skyflow.DeidentifyImageRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __deidentifyImage; /** * De-identifies sensitive data from a text file. This operation includes options applicable to all supported image text types.

For broader file type support, see De-identify File. * * @param {Skyflow.DeidentifyTextRequest} request * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Skyflow.BadRequestError} * @throws {@link Skyflow.UnauthorizedError} * @throws {@link Skyflow.InternalServerError} * * @example * await client.files.deidentifyText({ * vault_id: "f4b3b3b33b3b3b3b3b3b3b3b3b3b3b3b", * file: { * base64: "Zm9vYmFy", * data_format: "txt" * } * }) * * @example * await client.files.deidentifyText({ * vault_id: "VAULT_ID", * file: { * base64: "Zm9vYmFy", * data_format: "txt" * } * }) */ deidentifyText(request: Skyflow.DeidentifyTextRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __deidentifyText; /** * De-identifies sensitive data from a structured text file. This operation includes options applicable to all supported structured text file types.

For broader file type support, see De-identify File. * * @param {Skyflow.DeidentifyStructuredTextRequest} request * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Skyflow.BadRequestError} * @throws {@link Skyflow.UnauthorizedError} * @throws {@link Skyflow.InternalServerError} * * @example * await client.files.deidentifyStructuredText({ * vault_id: "f4b3b3b33b3b3b3b3b3b3b3b3b3b3b3b", * file: { * base64: "SGkgaSBhbSBEZXZhbnNodSwgbGl2...aW5nIGluIGNhbGlmb3JuaWEuIA==", * data_format: "json" * } * }) * * @example * await client.files.deidentifyStructuredText({ * vault_id: "VAULT_ID", * file: { * base64: "BASE64_DATA", * data_format: "json" * } * }) */ deidentifyStructuredText(request: Skyflow.DeidentifyStructuredTextRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __deidentifyStructuredText; /** * De-identifies sensitive data from a spreadsheet file. This operation includes options applicable to all supported spreadsheet file types.

For broader file type support, see De-identify File. * * @param {Skyflow.DeidentifySpreadsheetRequest} request * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Skyflow.BadRequestError} * @throws {@link Skyflow.UnauthorizedError} * @throws {@link Skyflow.InternalServerError} * * @example * await client.files.deidentifySpreadsheet({ * vault_id: "f4b3b3b33b3b3b3b3b3b3b3b3b3b3b3b", * file: { * base64: "SGkgaSBhbSBEZXZhbnNodSwgbGl2...aW5nIGluIGNhbGlmb3JuaWEuIA==", * data_format: "csv" * } * }) * * @example * await client.files.deidentifySpreadsheet({ * vault_id: "VAULT_ID", * file: { * base64: "BASE64_DATA", * data_format: "csv" * } * }) */ deidentifySpreadsheet(request: Skyflow.DeidentifySpreadsheetRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __deidentifySpreadsheet; /** * De-identifies sensitive data from a presentation file. This operation includes options applicable to all supported presentation file types.

For broader file type support, see De-identify File. * * @param {Skyflow.DeidentifyPresentationRequest} request * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Skyflow.BadRequestError} * @throws {@link Skyflow.UnauthorizedError} * @throws {@link Skyflow.InternalServerError} * * @example * await client.files.deidentifyPresentation({ * vault_id: "f4b3b3b33b3b3b3b3b3b3b3b3b3b3b3b", * file: { * base64: "SGkgaSBhbSBEZXZhbnNodSwgbGl2...aW5nIGluIGNhbGlmb3JuaWEuIA==", * data_format: "pptx" * } * }) * * @example * await client.files.deidentifyPresentation({ * vault_id: "VAULT_ID", * file: { * base64: "BASE64_DATA", * data_format: "pptx" * } * }) */ deidentifyPresentation(request: Skyflow.DeidentifyPresentationRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __deidentifyPresentation; /** * De-identifies sensitive data from an audio file. This operation includes options applicable to all supported audio file types.

For broader file type support, see De-identify File. * * @param {Skyflow.DeidentifyAudioRequest} request * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Skyflow.BadRequestError} * @throws {@link Skyflow.UnauthorizedError} * @throws {@link Skyflow.InternalServerError} * * @example * await client.files.deidentifyAudio({ * vault_id: "f4b3b3b33b3b3b3b3b3b3b3b3b3b3b3b", * file: { * base64: "SGkgaSBhbSBEZXZhbnNodSwgbGl2...aW5nIGluIGNhbGlmb3JuaWEuIA==", * data_format: "mp3" * } * }) * * @example * await client.files.deidentifyAudio({ * vault_id: "VAULT_ID", * file: { * base64: "BASE64_DATA", * data_format: "mp3" * } * }) */ deidentifyAudio(request: Skyflow.DeidentifyAudioRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __deidentifyAudio; /** * Returns the status of the detect run. * * @param {Skyflow.Uuid} runId - ID of the detect run. * @param {Skyflow.GetRunRequest} request * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Skyflow.BadRequestError} * @throws {@link Skyflow.UnauthorizedError} * @throws {@link Skyflow.NotFoundError} * @throws {@link Skyflow.InternalServerError} * * @example * await client.files.getRun("run_id", { * vault_id: "vault_id" * }) */ getRun(runId: Skyflow.Uuid, request: Skyflow.GetRunRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __getRun; /** * Re-identifies tokens in a file. * * @param {Skyflow.ReidentifyFileRequest} request * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Skyflow.BadRequestError} * @throws {@link Skyflow.UnauthorizedError} * @throws {@link Skyflow.InternalServerError} * * @example * await client.files.reidentifyFile({ * vault_id: "f4b3b3b33b3b3b3b3b3b3b3b3b3b3b3b", * file: { * base64: "Zm9vYmFy", * data_format: "txt" * } * }) */ reidentifyFile(request: Skyflow.ReidentifyFileRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __reidentifyFile; protected _getAuthorizationHeader(): Promise; }